//:C05:NobloatTest.cpp
#include <iostream>
#include <string>
#include "Nobloat.h"
using namespace std;

template<class StackType>
void emptyTheStack(StackType& stk)
{
    while(stk.size() > 0)
    {
        cout << stk.top() << endl;
        stk.pop();
    }
}

// An overload for emptyTheStack (not a Specialization!)
template<class T>
void emptyTheStack(Stack<T*>& stk)
{
    while(stk.size() > 0)
    {
        cout << *stk.top() << endl;
        stk.pop();
    }
}

int main(void)
{
    Stack<int> s1;
    s1.push(1);
    s1.push(2);
    emptyTheStack(s1);
    Stack<int*> s2;
    int i = 3;
    int j = 4;
    s2.push(&i);
    emptyTheStack(s2);
}

    
